<template>
    <div id="total-container" v-bind:style="{height: height+ 'px'}">
        <a v-bind:href="wareUrl">{{ wareName }}</a><br>
        <p>{{ price }}</p>
        <a v-bind:href="buyerUrl">{{ buyer }}</a>
        <a v-bind:href="sellerUrl">{{ seller }}</a>
    </div>
</template>

<script>

    export default {
        name: "question-block",
        props: {
            height: Number,
            wareName: String,
            price: Number,
            buyer: String,
            seller: String
        },
        data() {
            return {

                height: this.height,
                wareName: this.wareName,
                price: this.price,
                buyer: this.buyer,
                seller: this.seller
            }
        },
        computed: {
            wareUrl: function () {
                return "../ware/" + this.wareName + "/";
            },
            buyerUrl: function () {
                return '../userpage/' + this.buyer + "/";
            },
            sellerUrl: function () {
                return '../userpage/' + this.seller + '/';
            }
        },
        methods: {
            findBuyer: function () {

            },
            findSeller: function () {

            },
            wareInDetail: function () {
                return
            }

        }
    }
</script>

<style scoped>

</style>